home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch ;
- access ;
- symbols sprited:1.2.1;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 88.07.25.14.19.20; author ouster; state Exp;
- branches 1.2.1.1;
- next 1.1;
-
- 1.1
- date 88.05.20.15.49.19; author ouster; state Exp;
- branches ;
- next ;
-
- 1.2.1.1
- date 91.12.02.20.37.08; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @Lint.
- @
- text
- @/*
- * Mem_Bin.c --
- *
- * Source code for the "Mem_Bin" library procedure. See memInt.h
- * for overall information about how the allocator works.
- *
- * Copyright 1985, 1988 Regents of the University of California
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies. The University of California
- * makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without
- * express or implied warranty.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: Mem_Bin.c,v 1.1 88/05/20 15:49:19 ouster Exp $ SPRITE (Berkeley)";
- #endif not lint
-
- #include "memInt.h"
-
- /*
- * ----------------------------------------------------------------------------
- *
- * Mem_Bin --
- *
- * Make objects of the given size be binned.
- *
- * Results:
- * None.
- *
- * Side effects:
- * The bin corresponding to blocks of the given size is initialized.
- *
- * ----------------------------------------------------------------------------
- */
- ENTRY void
- Mem_Bin(numBytes)
- int numBytes;
- {
- int index;
-
- LOCK_MONITOR;
-
- if (!memInitialized) {
- MemInit();
- }
- numBytes = BYTES_TO_BLOCKSIZE(numBytes);
- if (numBytes > BIN_SIZE) {
- UNLOCK_MONITOR;
- return;
- }
- index = BLOCKSIZE_TO_INDEX(numBytes);
- if (memFreeLists[index] == NOBIN) {
- memFreeLists[index] = (Address) NULL;
- }
-
- UNLOCK_MONITOR;
- }
- @
-
-
- 1.2.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d18 1
- a18 1
- static char rcsid[] = "$Header: /sprite/src/lib/c/stdlib/RCS/Mem_Bin.c,v 1.2 88/07/25 14:19:20 ouster Exp $ SPRITE (Berkeley)";
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d18 1
- a18 1
- static char rcsid[] = "$Header: proto.c,v 1.2 88/03/11 08:39:08 ouster Exp $ SPRITE (Berkeley)";
- d42 1
- a42 2
- int index, admin;
- register Address blockPtr;
- @
-